const express = require("express");
// 文章
const navigation = require("../middleware/Navigation");
const navigationApp = express();
// 获取分类
navigationApp.get("/getWebPageList", [navigation.getWebPageList], (req, res) => {
    res.send(req.webPageList);
});
// 获取指定分类
navigationApp.get("/getWebPageId", [navigation.getWebPageId], (req, res) => {
    res.send(req.webPageInfo);
});
// 导航是否启用
navigationApp.get("/updateStatus", [navigation.updateStatus], (req, res) => {
    if (req.affectedRows > 0) {
        res.json({
            code: 200,
            title: "成功",
            message: '设置成功'
        })
    } else {
        res.json({
            code: 404,
            title: "失败",
            message: '设置失败'
        })
    }
});
module.exports = navigationApp;